<template>
  <card :header="false" class="reset-card">
    <template v-slot:header>
      <Header @add="addEvent" />
    </template>
    <template v-slot:filter>
      <FilterTool ref="FilterTool" @search="searchEvent($event)" />
    </template>
    <TableArea ref="TableArea" @edit="EditEvent($event)" />

  </card>
</template>
<script>
export default {
  components: {
    Header: () => import('./components/approval-type/Header'),
    FilterTool: () => import('./components/approval-type/FilterTool'),
    TableArea: () => import('./components/approval-type/TableArea')
  },
  data() {
    return {
      tableKey: 0,
      listLoading: true,
      tableHeight: window.innerHeight - 360
    }
  },

  methods: {
    addEvent() {
      this.$refs.Add.show()
    },
    EditEvent(row) {
      this.$refs.Edit.editRowInfo(row)
      this.$refs.Edit.show()
    },
    searchEvent(row) {
      this.$refs.TableArea.formInline = row
      this.$refs.TableArea.queryListByPage('search')
    },
    refreshEvent() {
      this.$refs.TableArea.queryListByPage()
    }
  }
}
</script>
<style scoped>
</style>

